﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
//using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;

namespace Cyklotron
{
    public partial class Okno : Form
    {
        public Okno()
        {
            InitializeComponent();
        }
        
        #region obsluga kontrolek suwakow
        private void PredkoscBar_ValueChanged(object sender, EventArgs e)
        {
           
        }

        private void MagnetyczneBar_ValueChanged(object sender, EventArgs e)
        {
           
        }

        private void ElektryczneBar_ValueChanged(object sender, EventArgs e)
        {
           
        }
        #endregion

        CycloClient cc;

        private void start_btn_Click(object sender, EventArgs e)
        {
            cc = new CycloClient(5000, textBox1.Text, (byte)IDText.Text[0], panel1.CreateGraphics());
        }

        private void button1_Click(object sender, EventArgs e)
        {
            byte b = byte.Parse(IDText.Text);
            cc.sendData(new byte[] { (byte)'I', (byte)'D', (byte)'=', (byte)IDText.Text[0] });
        }
    }
}
